<template>
<div>
    <h1>{{msg}}</h1>
    <h2>学生名称:{{name}}</h2>
    <button @click="send">发送数据给school</button>
</div>
</template>

<script>
export default {
  name:'StudentN',
  data() {
    return {
        msg:'你好',
        name: '老王'
    }
  },
  methods:{
    send(){
      this.$bus.$emit('hello',666)
    }
  }
}
</script>

<style scoped>
.demo{
  background: blue;
}
</style>